Computer
The Computer command is a request for information about the local computer's operating environment.This command is intended for use by programmers only. To use it, you should be familiar with the
Gestalt
function as described in Inside Macintosh: Operating System Utilities.SYNTAX
computer gestaltSelector [ has bitsToTest ]PARAMETERS
- gestaltSelector
- The Gestalt selector for the feature you want to test. The Finder converts these constants to the Gestalt codes for the equivalent information about the operating environment:
- CPU
FPU
MMU
hardware
operatingsystem
soundsystem
memoryavailable
(including virtual memory)memory
installed
- For other selectors, use the appropriate code as described
in Inside Macintosh: Operating System Utilities.
Class: Four-character code recognized by theGestalt
function. If you use a code instead of one of the constants listed above,
it must have four characters and it must be given either in
the form of a string or within double angle brackets after the wordclass
:"xxxx"
<<class xxxx»- bitsToTest
- The value of the bits to test.
Class: Integer
Default value: NoneRESULT
Integer if the bitsToTest parameter is not included; Boolean if it is.EXAMPLES
This script returnstrue
if the sound input device bit returned by Gestalt is set, andfalse
if it isn't:
tell application "Finder" set soundInputDevice to 32 computer sound system has soundInputDevice end tellThis script returns an integer that indicates the total amount of memory available (including virtual memory), in bytes:
tell application "Finder" computer memory available end tell